package org.chupito.service.impl;

import java.util.List;

import javax.ejb.Local;
import javax.ejb.Stateless;
import javax.inject.Inject;

import org.chupito.dao.impl.InvoiceDAO;
import org.chupito.data.Invoice;
import org.chupito.search.SearchObject;
import org.chupito.service.InvoiceService;



@Local
@Stateless
//@TransactionManagement(TransactionManagementType.CONTAINER)
public class InvoiceServiceImpl implements InvoiceService{
	
	@Inject
	private InvoiceDAO dao;
	
	public InvoiceServiceImpl() {		
	}
	
	@Override
	//@TransactionAttribute(TransactionAttributeType.REQUIRED)
	public void save(Invoice invoice) {
		dao.save(invoice);
	}
	

	@Override
	public List<Invoice> find(SearchObject so) {			
		return  (List<Invoice>) dao.find(so);
	}
}
